package org.thanos.demo.entity;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
@AllArgsConstructor
public class SysMenu {

    private static final List<SysMenu> LISTS = new ArrayList<>();

    static {
        LISTS.add(new SysMenu(1, "首页", "/dashboard", "dashboard", 1, 1, "dashboard:r", 0));
        LISTS.add(new SysMenu(2, "系统管理", "#", "setting", 1, 1, null, 0));
        LISTS.add(new SysMenu(3, "用户管理", "/system/user", "user", 1, 2, "system:user:r", 2));
        LISTS.add(new SysMenu(4, "新增用户", null, null, 2, 99, "system:user:c", 3));
        LISTS.add(new SysMenu(5, "修改用户", null, null, 2, 99, "system:user:u", 3));
        LISTS.add(new SysMenu(6, "删除用户", null, null, 2, 99, "system:user:d", 3));
        LISTS.add(new SysMenu(7, "角色管理", "/system/role", "role", 1, 2, "system:role:r", 2));
        LISTS.add(new SysMenu(8, "新增角色", null, null, 2, 99, "system:role:c", 6));
        LISTS.add(new SysMenu(9, "修改角色", null, null, 2, 99, "system:role:u", 6));
        LISTS.add(new SysMenu(10, "删除角色", null, null, 2, 99, "system:role:d", 6));
    }

    private Integer id;
    private String name;
    private String path;
    private String icon;
    // 1为菜单，2为按钮(接口)
    private Integer type;
    private Integer level;
    private String operation;
    private Integer parentId;

    public static List<SysMenu> data(){
        return LISTS;
    }
}
